package com.ruoyi.web.controller.bussiness;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.service.IPlayerChatRoomService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chenhainan
 * @since 2024-12-15 16:53
 */
@RestController
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RequestMapping("/chatRoomPopularity")
@Api(tags = "PC-11.聊天室人气")
public class PlayerChatRoomPopularityController extends BaseController {

    private final IPlayerChatRoomService playerChatRoomService;


    @GetMapping("/")
    @ApiOperation("聊天室人气列表")
    public TableDataInfo chatRoomPopularity(Integer playerId) {
        startPage();
        return getDataTable(playerChatRoomService.chatRoomPopularity(playerId));
    }

}
